package org.springframework.samples.mvc.basic.user;

import java.util.HashMap;
import java.util.Map;

public class AuthenticationUserBusinessService {
	
	private Map<String, AuthenticationUser> users = new HashMap<String, AuthenticationUser>();
	
	public AuthenticationUserBusinessService() {
		users.put("mihajlovska.sonja", new AuthenticationUser(true, false, false, false, "mihajlovska.sonja", "sonja.229", "ROLE_USER", "ROLE_DELETE", "ROLE_SAVE"));
		users.put("user0001", new AuthenticationUser(true, false, false, false, "user0001", "qwertyUser0001", "ROLE_USER"));
	}

	public AuthenticationUser findByUsername(String username) {
		return users.get(username);
	}

}
